#include <abstract_factory_pattern.h>

QString RedRectangle::getName()
{
    return QString("RedRectangle");
}

QString BlueRectanle::getName()
{
    return QString("BlueRectangle");
}

QString RedSquare::getName()
{
    return QString("RedSquare");
}

QString BlueSquare::getName()
{
    return QString("BlueSquare");
}

Rectangle * RedFactory::getRectangle()
{
    return new RedRectangle();
}

Square * RedFactory::getSquare()
{
    return new RedSquare();
}

Rectangle * BlueFactory::getRectangle()
{
    return new BlueRectanle();
}

Square * BlueFactory::getSquare()
{
    return new BlueSquare();
}

/*
    RedFactory *redFactory = new RedFactory();
    Rectangle *redRectangle = redFactory->getRectangle();
    cout << redRectangle->getName().toUtf8().data() << endl;
    Square *redSquare = redFactory->getSquare();
    cout << redSquare->getName().toUtf8().data() << endl;

    BlueFactory *blueFactory = new BlueFactory();
    Rectangle *blueRectangle = blueFactory->getRectangle();
    cout << blueRectangle->getName().toUtf8().data() << endl;
    Square *blueSquare = blueFactory->getSquare();
    cout << blueSquare->getName().toUtf8().data() << endl;
*/
